#include "addmaingroupdialog.h"
#include "ui_addmaingroupdialog.h"

addMainGroupDialog::addMainGroupDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::addMainGroupDialog)
{
    ui->setupUi(this);
    
    ui->lineEdit->setText("新建主群组");
    connect(ui->cancelBtn, SIGNAL(clicked(bool)), this, SLOT(close()));
    connect(ui->OKBtn, SIGNAL(clicked(bool)), this, SLOT(getAllInfo()));
    connect(ui->OKBtn, SIGNAL(clicked(bool)), this, SLOT(accept()));
}

addMainGroupDialog::~addMainGroupDialog()
{
    delete ui;
}

void addMainGroupDialog::getAllInfo()
{
    if(!ui->lineEdit->text().isEmpty())
        this->mainGroupName = ui->lineEdit->text();    
    this->mainGroupBeginValue = ui->beginSpinBox->value();
    this->mainGroupNum = ui->countSpinBox->value();
}
